#ifndef _PIECE_SELECTOR_H_
# define _PIECE_SELECTOR_H_

# include "Board.h"
# include "Image.h"

class PieceSelector
{
private:
	static PieceSelector& m_instance;
	Image* m_selectedPiece;
	//Image m_selectedCaseCursor;
	SDL_Rect m_position;
	SDL_Rect m_boardPosition;
	BoardCase m_caseBackup;

private:
	PieceSelector();
	~PieceSelector();

public:
	static PieceSelector& Instance();
	bool draw(SDL_Surface* _screen);
	void doEvents();
	Image* getSelectedPiece();
	void setSelectedPiece(Image* _selectedPiece);
	void setBoardPosition(BoardCase _x, BoardCase _y);
	SDL_Rect const& getSelectedPosition() const;
	void setCaseBackup(BoardCase& _case);
	BoardCase const& getCaseBackup() const;

public:
	__declspec(property(get=getSelectedPiece, put=setSelectedPiece))Image* SelectedPiece;
	__declspec(property(get=getSelectedPosition))SDL_Rect SelectedPosition;
	__declspec(property(get=getCaseBacku, put=setCaseBackup))BoardCase CaseBackup;

private:
	PieceSelector(PieceSelector const&);
	PieceSelector& operator=(PieceSelector const&);
};

#endif // _PIECE_SELECTOR_H_
